from rest_framework import serializers

from apps.goods.models import GoodsVisitCount

# 定义商品分类序列化器
class GoodsSerializer(serializers.ModelSerializer):
    category = serializers.StringRelatedField(read_only=True)
    class Meta:
        model = GoodsVisitCount
        fields = ('category', 'count')